package com.niiwoo.activity.stage.dto.request;

import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;

/**
 * Created by dengyunhui on 2017/11/30.
 */
@Setter
@Getter
public class ActivityPageRequestDTO implements Serializable {

    private String orderBy;
    private Integer pageNumber;
    private Integer pageSize;

    public Integer getOffset() {
        if (pageNumber == null || pageSize == null) {
            return null;
        }
        return (this.pageNumber - 1) * this.pageSize;
    }
}
